package com.itheima.controller;


import com.itheima.domain.po.Role;
import com.itheima.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    RoleService service;

    @GetMapping
    public List<Role> getAll(){
        List<Role> list = service.findAllRoles();
        return list;
    }

}
